package com.ferryc.modules.sys.entity.param;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.ferryc.commons.entity.DataEntity;
import com.ferryc.constant.ValidatorConstant;
import com.ferryc.modules.sys.entity.SysPermissions;

/**
 * 
 * 类名: SysPermissions <br/>
 * 作用： <br/>
 * 方法： <br/>
 * 创建者: Ferry C <br/>
 * 添加时间: 2017年12月02日 04:20:09 <br/>
 * 
 */
public class SysPermissionsParam extends DataEntity<SysPermissionsParam> {
	private static final long serialVersionUID = 1L;

	/** PermissionName */
	@NotBlank(message = ValidatorConstant.ERROR_PERMISSION_NAME)
	@Length(min = 2, max = 40, message = ValidatorConstant.ERROR_PERMISSION_NAME)
	private String permissionName;
	/** 菜单ID */
	@NotBlank(message = ValidatorConstant.ERROR_PERMISSION_MENU)
	private String menuIds;

	public String getPermissionName() {
		return this.permissionName;
	}

	public void setPermissionName(String permissionName) {
		this.permissionName = permissionName;
	}

	public String getMenuIds() {
		return menuIds;
	}

	public void setMenuIds(String menuIds) {
		this.menuIds = menuIds;
	}

	public SysPermissions toSysPermissions() {
		SysPermissions po = new SysPermissions();
		po.setId(this.id);
		po.setPermissionName(this.permissionName);
		po.setStatus(this.status);
		po.setCreateBy(this.createBy);
		po.setCreateDate(this.createDate);
		po.setUpdateBy(this.updateBy);
		po.setUpdateDate(this.updateDate);
		po.setRemarks(this.remarks);
		po.setDelFlag(this.delFlag);
		po.setLimit(this.limit);
		po.setOffset(this.offset);
		po.setMenuIds(this.menuIds);
		po.setLikeName(this.likeName);
		return po;
	}

}